how to inject one element to another element in javascript